import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from './http'
import VueCookies from 'vue-cookies'
import 'element-ui/lib/theme-chalk/index.css';
import JSEncrypt  from 'jsencrypt'
import ElementUI from 'element-ui';
import utils from './utils/utils';
Vue.use(ElementUI);
Vue.use(VueCookies);
Vue.config.productionTip = false
//这样可以在各个组件中使用axios
Vue.prototype.$axios=axios;
//Vue.prototype.jsEncrypt = JsEncrypt
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

//this.$store.replaceState(Object.assign({}, this.$store.state,JSON.parse(sessionStorage.getItem("storedata"))))
var data=utils.fillCookReturnData()
console.log(data)
console.log("完成")



window.onload=function(){
  
  //window.location.host    window.top.location.href window.top.location.host
  //console.log(document.domain);
  //window.parent.postMessage(data,'http://www.springbootjwt.com/');
  console.log("window.onload中的data")
  console.log(data)
  window.parent.postMessage(data,'*');

  
}

